dispatchNestedScroll

abstract fun dispatchNestedScroll(dxConsumed: Int, dyConsumed: Int, dxUnconsumed: Int, dyUnconsumed: Int, @Nullable offsetInWindow: Array<Int>, type: Int): Boolean(source)

Dispatch one step of a nested scroll in progress.

Implementations of views that support nested scrolling should call this to report info about a scroll in progress to the current nested scrolling parent. If a nested scroll is not currently in progress or nested scrolling is not enabled for this view this method does nothing.

Compatible View implementations should also call dispatchNestedPreScroll before consuming a component of the scroll event themselves.

Return

true if the event was dispatched, false if it could not be dispatched.

Parameters

dxConsumed

Horizontal distance in pixels consumed by this view during this scroll step

dyConsumed

Vertical distance in pixels consumed by this view during this scroll step

dxUnconsumed

Horizontal scroll distance in pixels not consumed by this view

dyUnconsumed

Horizontal scroll distance in pixels not consumed by this view

offsetInWindow

Optional. If not null, on return this will contain the offset in local view coordinates of this view from before this operation to after it completes. View implementations may use this to adjust expected input coordinate tracking.

type

the type of input which cause this scroll event

See also